Skip to content

bb-skip-run-on: lock and unlock building blocks - #73

Draft
grubmeshi wants to merge 2 commits into
mainfrom
feature/bb-skip-run-on
Draft

grubmeshi wants to merge 2 commits into
mainfrom
feature/bb-skip-run-on

Conversation

@grubmeshi

@grubmeshi grubmeshi commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

bb-skip-run-on: locked building blocks

BD-2867: meshStack can lock a building block so that it starts no run until someone unlocks it (meshcloud/meshfed-release#11684). Design: https://claude.ai/code/artifact/05d32f14-86a8-4ab0-a4d4-58701490e4a7

  • MeshBuildingBlockV2Client.Update takes MeshBuildingBlockV2UpdateOptions{SkipRunOn}; VERSION_UPGRADE is sent as a repeated skipRunOn query parameter, and an empty set sends none.
  • Lock and Unlock on the client, and the commands meshstack bb lock <uuid> and meshstack bb unlock <uuid>.
  • The action UNLOCK_RUNS. bb wait and trigger-run --wait stop at a locked block and say how to unlock it.

Cross-repo PRs

🤖 Generated with Claude Code

@meshcloud-gh-actions

Copy link
Copy Markdown

Coverage of the acceptance run against the meshStack backend, on a9295d472cae7d0464e5a29e98400f1b1d5b4cfe.

Scope Coverage
Unit tests 78.4%
Acceptance tests 55.4%
Combined 81.0%
Uncovered functions
client/api_key.go:52: meshApiKeyClient.Create 0.0%
client/api_key.go:56: meshApiKeyClient.Read 0.0%
client/api_key.go:60: meshApiKeyClient.Update 0.0%
client/api_key.go:64: meshApiKeyClient.Delete 0.0%
client/api_key_permissions.go:20: ApiKeyPermissions.AllCodes 0.0%
client/api_key_permissions.go:33: ApiKeyPermissions.WorkspaceCodes 0.0%
client/api_key_permissions.go:262: AllApiKeyPermissions 0.0%
client/api_key_permissions.go:266: WorkspacePermissionCodes 0.0%
client/building_block_definition.go:71: MeshBuildingBlockDefinitionApprovalPolicies.NothingRequiresApproval 0.0%
client/building_block_definition.go:82: DisabledSchedule 0.0%
client/building_block_definition.go:89: MeshBuildingBlockDefinitionSchedule.IsDisabled 0.0%
client/building_block_definition.go:93: MeshBuildingBlockDefinitionSpec.HasNeutralPolicies 0.0%
client/building_block_definition.go:97: MeshBuildingBlockDefinitionSpec.WithNeutralPolicies 0.0%
client/building_block_definition.go:166: meshBuildingBlockDefinitionClient.List 0.0%
client/building_block_definition.go:173: meshBuildingBlockDefinitionClient.Read 0.0%
client/building_block_definition.go:177: meshBuildingBlockDefinitionClient.Create 0.0%
client/building_block_definition.go:181: meshBuildingBlockDefinitionClient.Update 0.0%
client/building_block_definition.go:185: meshBuildingBlockDefinitionClient.Delete 0.0%
client/building_block_definition_version.go:101: MeshBuildingBlockType.TagInputTargets 0.0%
client/building_block_definition_version.go:245: meshBuildingBlockDefinitionVersionClient.Create 0.0%
client/building_block_definition_version.go:254: meshBuildingBlockDefinitionVersionClient.Update 0.0%
client/building_block_definition_version_implementation.go:81: MeshBuildingBlockDefinitionImplementation.InferType 0.0%
client/building_block_definition_version_implementation.go:95: MeshBuildingBlockDefinitionImplementation.MarshalJSONTo 0.0%
client/building_block_definition_version_implementation.go:108: *MeshBuildingBlockDefinitionImplementation.UnmarshalJSONFrom 0.0%
client/building_block_runner.go:93: meshBuildingBlockRunnerClient.Create 0.0%
... and 125 more

covdata func names a method without its receiver, so an entry can belong to an implementation nothing selects rather than to a function the tests never reached. Open the file and line before reading one as a coverage gap.

grubmeshi and others added 2 commits November 8, 2026 19:43
…pgrade

MeshBuildingBlockV2Client.Update takes MeshBuildingBlockV2UpdateOptions. Its SkipRunOn set goes out
as the repeated query parameter skipRunOn. With VERSION_UPGRADE, meshStack saves an update that
upgrades the definition version and starts no run. An empty set sends no parameter, so the client
still works against an older meshStack.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
meshStack locks a building block when an update with skipRunOn matches, or on POST .../lock, and
starts no run of it until POST .../unlock. A locked block has the action UNLOCK_RUNS.

- The client gets the action UNLOCK_RUNS, MeshBuildingBlockV2Status.IsLocked, and Lock and Unlock
  on MeshBuildingBlockV2Client.
- "meshstack buildingblock lock <uuid>" and "meshstack buildingblock unlock <uuid>" call them and
  write the building block, as trigger-run does.
- "meshstack buildingblock wait" and "trigger-run --wait" stop at a locked block, and fail with the
  hint to unlock it, where they waited a minute for a run that never starts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@grubmeshi
grubmeshi force-pushed the feature/bb-skip-run-on branch from a9295d4 to ef07a6f Compare November 8, 2026 18:45
@sonarqubecloud

sonarqubecloud Bot commented Nov 8, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant